package com.haizhi.bean;

// Generated 2016-8-15 17:44:37 by Hibernate Tools 3.2.2.GA

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Entity: 
 */
@Entity
@Table(name = "tb_product_data", catalog = "db_lemon3d")
public class TbProductData implements java.io.Serializable {

	/** 
	 * ����id.
	 */

	private Integer dataId;

	/** 
	 * ��Ʒid.
	 */

	private TbProduct tbProduct;

	/** 
	 * ��������1��ʾjson,0��ʾ�ļ�.
	 */

	private int dataType;

	/** 
	 * ��ʾ���ݰ汾��.
	 */

	private int dataVersion;

	/** 
	 * ��ʾ����ʱ��.
	 */

	private Date dataAddTime;

	private String dataContent;

	public TbProductData() {
	}

	public TbProductData(TbProduct tbProduct, int dataType, int dataVersion,
			Date dataAddTime, String dataContent) {
		setTbProduct(tbProduct);
		setDataType(dataType);
		setDataVersion(dataVersion);
		setDataAddTime(dataAddTime);
		setDataContent(dataContent);
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "data_id", unique = true, nullable = false)
	public Integer getDataId() {
		return this.dataId;
	}

	public void setDataId(Integer dataId) {
		this.dataId = dataId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "product_Id", nullable = false)
	public TbProduct getTbProduct() {
		return this.tbProduct;
	}

	public void setTbProduct(TbProduct tbProduct) {
		this.tbProduct = tbProduct;
	}

	@Column(name = "data_type", nullable = false)
	public int getDataType() {
		return this.dataType;
	}

	public void setDataType(int dataType) {
		this.dataType = dataType;
	}

	@Column(name = "data_version", nullable = false)
	public int getDataVersion() {
		return this.dataVersion;
	}

	public void setDataVersion(int dataVersion) {
		this.dataVersion = dataVersion;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "data_add_time", nullable = false, length = 19)
	public Date getDataAddTime() {
		return this.dataAddTime;
	}

	public void setDataAddTime(Date dataAddTime) {
		this.dataAddTime = dataAddTime;
	}

	@Column(name = "data_content", nullable = false)
	public String getDataContent() {
		return this.dataContent;
	}

	public void setDataContent(String dataContent) {
		this.dataContent = dataContent;
	}

}
